package com.k.demo.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.k.demo.entity.GoodOrder;
import com.k.demo.entity.Notice;

public interface GoodOrderService {

	//查找全部人全部订单的接口
	List<GoodOrder> getAllGoodOrder();
	
	//查找当前人的全部订单
	List<GoodOrder> getUserAllGoodOrders(Integer userid);
	
	//查找当前人的已送达
	List<GoodOrder> getUserArrivedGoodOrders(Integer userid);
	
	//查找当前人的已支付
	List<GoodOrder> getUserPaidGoodOrders(Integer userid);
	
	//查找当前人的已取消
	List<GoodOrder> getUserCancelGoodOrders(Integer userid);
	
	//向订单表里添加一行数据
	boolean insertGoodOrder(GoodOrder goodOrder);
	
	//根据订单id获取顶订单
	GoodOrder getGoodOrderById(int orderid);
	
	//更新订单
	GoodOrder updateGoodOrder(GoodOrder goodorder);
	
	//更新订单状态为已取消
	GoodOrder updateGoodOrderState(int orderid);
	
	//根据系统时间更新
	int updateState(int userid);
	
	//根据时间区间查询
	List<GoodOrder> getByTimes(String time1, String time2);
	
	//批量删除
	boolean deleteByGroup(List<Integer> list);
	
	//单个删除
	int  deleteById(int id);
	
	//根据订单信息组合查询
	List<GoodOrder> getByGoodOrderInfo(GoodOrder goodOrder);
	
	//查询结果分页显示
	PageInfo<GoodOrder> getByGoodOrderInfoWith(int pageNum,int pageSize,GoodOrder goodOrder);
	
	//时间区间查询分页显示
	PageInfo<GoodOrder> getByTimeWithPage(int pageNum,int pageSize,String time1,String time2);
	
	//全部查询分页显示
	PageInfo<GoodOrder> getAllWithPage(int pageNum,int pageSize);
	
	//根据日期获得当天的订单总数
	int getNumberByDate(String date);
	
	//获得今天的订单总数
	int getNumberToday();
	
	//获取当天销售总额
	Double getTotalSales();
	//获取当天实际销售额
	Double getActualSales();
	
	Double getTotalSalesByDate(String date);
	
	Double getActualSalesByDate(String date);
	
	//根据日期分组并获取当天的销量
	Map<String,Object> getDateAndTotalSaleNum(String start_date,String end_date);
	
	//根据日期分组并获取当天的订单数
	Map<String,Object> getDateAndOrderNum(String start_date,String end_date);
	
	//返回日期分组并获取当天的销售额
	Map<String,Object> getDateAndPrice(String start_date,String end_date);
	
	//返回当前用户订单数量
	int getAllOrderAmountByUserId(int user_id);
	
	//返回当前用户未评价订单数量
	int getNotEvaluationOrderAmountByUserId(int user_id);
}
